<?php
include_once("include/include.php.inc");
html_header("Delete ticket");

/*   $backlink=getenv('HTTP_REFERER');*/

   if (!empty($_GET['tic_sup_no'])){
         DIE("<center>Ticket Already Assigned to $tic_sup_no It Cannot Be Deleted.</center>");
         }

   if (isset($_GET['tic_no'])) {
      $mtic = $_GET['tic_no'];
      $result = "DELETE FROM chd_tickets WHERE chd_tickets.tic_no=$mtic";
      $action = mysql_query($result);
/*               if (FALSE === ($action = mysql_query($result)))
              {
                  print mysql_error()."<br />";
                  print $result;
              }*/

      print "<center>Ticket Deleted.</center>";
	  print "<br>";
      print "<center><form method=\"post\" action=\"ticket_show.php\">";
	  print "<input type=\"submit\" value=\" OK \"></form></center>";

   }
   else
     die("<center>No Ticket# Passed!!! Error!!!!.</center>");

  html_footer();
?>